package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AhhcDailySummaryMapper;
import com.ruoyi.system.domain.AhhcDailySummary;
import com.ruoyi.system.service.IAhhcDailySummaryService;

/**
 * 仅统计当天有数据的患者，补录后自动更新Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-15
 */
@Service
public class AhhcDailySummaryServiceImpl implements IAhhcDailySummaryService 
{
    @Autowired
    private AhhcDailySummaryMapper ahhcDailySummaryMapper;

    /**
     * 查询仅统计当天有数据的患者，补录后自动更新
     * 
     * @param patientId 仅统计当天有数据的患者，补录后自动更新主键
     * @return 仅统计当天有数据的患者，补录后自动更新
     */
    @Override
    public AhhcDailySummary selectAhhcDailySummaryByPatientId(String patientId)
    {
        return ahhcDailySummaryMapper.selectAhhcDailySummaryByPatientId(patientId);
    }

    /**
     * 查询仅统计当天有数据的患者，补录后自动更新列表
     * 
     * @param ahhcDailySummary 仅统计当天有数据的患者，补录后自动更新
     * @return 仅统计当天有数据的患者，补录后自动更新
     */
    @Override
    public List<AhhcDailySummary> selectAhhcDailySummaryList(AhhcDailySummary ahhcDailySummary)
    {
        return ahhcDailySummaryMapper.selectAhhcDailySummaryList(ahhcDailySummary);
    }

    /**
     * 新增仅统计当天有数据的患者，补录后自动更新
     * 
     * @param ahhcDailySummary 仅统计当天有数据的患者，补录后自动更新
     * @return 结果
     */
    @Override
    public int insertAhhcDailySummary(AhhcDailySummary ahhcDailySummary)
    {
        return ahhcDailySummaryMapper.insertAhhcDailySummary(ahhcDailySummary);
    }

    /**
     * 修改仅统计当天有数据的患者，补录后自动更新
     * 
     * @param ahhcDailySummary 仅统计当天有数据的患者，补录后自动更新
     * @return 结果
     */
    @Override
    public int updateAhhcDailySummary(AhhcDailySummary ahhcDailySummary)
    {
        return ahhcDailySummaryMapper.updateAhhcDailySummary(ahhcDailySummary);
    }

    /**
     * 批量删除仅统计当天有数据的患者，补录后自动更新
     * 
     * @param patientIds 需要删除的仅统计当天有数据的患者，补录后自动更新主键
     * @return 结果
     */
    @Override
    public int deleteAhhcDailySummaryByPatientIds(String[] patientIds)
    {
        return ahhcDailySummaryMapper.deleteAhhcDailySummaryByPatientIds(patientIds);
    }

    /**
     * 删除仅统计当天有数据的患者，补录后自动更新信息
     * 
     * @param patientId 仅统计当天有数据的患者，补录后自动更新主键
     * @return 结果
     */
    @Override
    public int deleteAhhcDailySummaryByPatientId(String patientId)
    {
        return ahhcDailySummaryMapper.deleteAhhcDailySummaryByPatientId(patientId);
    }
}
